<template>
  <el-container id="layout_app">
    <el-aside width="200px">
      <h3>生死簿后台</h3>
      <!-- 导航菜单开始 -->
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
        background-color="rgb(51,51,51)"
        text-color="#fff"
        active-text-color="#ffd04b"
        
      >
        <el-menu-item index="1">
          <i class="el-icon-menu"></i>
          <span slot="title">导航一</span>
        </el-menu-item>
        <!--  -->
        <el-submenu index="2">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>系统设置</span>
          </template>
          <el-menu-item-group>
            <router-link  to="/menu">
              <el-menu-item index="2-1">菜单管理</el-menu-item>
            </router-link>
            <el-menu-item index="2-2">角色管理</el-menu-item>
            <el-menu-item index="2-3">管理员管理</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
        <el-submenu index="3">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>商城管理</span>
          </template>
          <el-menu-item-group>
            <el-menu-item index="3-1">商品分类</el-menu-item>
            <el-menu-item index="3-2">商品规格管理</el-menu-item>
            <el-menu-item index="3-3">商品管理</el-menu-item>
            <el-menu-item index="3-4">会员管理</el-menu-item>
            <el-menu-item index="3-5">轮播图管理</el-menu-item>
            <el-menu-item index="3-6">秒杀活动管理</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
      </el-menu>
    </el-aside>
    <!-- 导航菜单结束 -->
    <el-container>
      <el-header>
        <el-button type="primary" icon="el-icon-s-fold" size="mini"></el-button>
        <el-breadcrumb separator="/">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item><a href="/">活动管理</a></el-breadcrumb-item>
        </el-breadcrumb>
        <!-- 按钮 -->
         <el-button icon="el-icon-back" size="mini" circle ></el-button>
         <!-- 下拉 -->
                                <el-dropdown>
                        <span class="el-dropdown-link">
                            admin<i class="el-icon-arrow-down el-icon--right"></i>
                        </span>
                        <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item class="el-icon-user">个人信息</el-dropdown-item>
                            <el-dropdown-item class="el-icon-full-screen">全屏预览</el-dropdown-item>
                            <el-dropdown-item class="
el-icon-switch-button">安全退出</el-dropdown-item>
                        </el-dropdown-menu>
                        </el-dropdown>
      </el-header>

      <el-main><router-view></router-view></el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      // console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      // console.log(key, keyPath);
    },
  },
};
</script>
 
<style>
#layout_app {
  height: 100vh;
}
.el-header,
.el-footer {
  background-color: #fff;
  color: #333;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 55px;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}
.el-menu {
  height: calc(100% - 60px);
}
.el-breadcrumb {
  display: inline-block;
  color: black;
  
}
.el-dropdown-link {
    cursor: pointer;
    color: #409EFF;
    
  }
  .el-dropdown {
    font-size: 12px;
    position: absolute;
    right: 20px;
  }
</style>